﻿<?xml version="1.0" encoding="utf-8" ?>
<!--
Sample CSV file:
PrjID;PrjName;owners[|];members[|];BaseDN
001;MyProject;Mark;Mike|Nancy|John;DN=my,DN=name
-->
<Configuration xmlns="http://www.utillity.com/schemas/rave/v1" targetSystem="NtfsFileSystem" rootDirectory="\\domain\Projects">
	<Directories>
		<Directory removeAllOtherSecurityEntries="true" removeSecurityEntriesInheritance="true" skipProcessingIfDirectoryExists="false">
			<Name>P_${PrjID}.${Now.Year} ${PrjName}</Name>
			<SecurityEntries>
				<SecurityEntry type="Group">
					<MemberID>PrjOwners</MemberID>
					<Rights>Modify, Synchronize</Rights>
				</SecurityEntry>
				<SecurityEntry type="Group">
					<MemberID>PMO</MemberID>
					<Rights>Read, Synchronize</Rights>
				</SecurityEntry>
				<SecurityEntry type="Group">
					<MemberID>PrjMembers</MemberID>
					<Rights>Read, Synchronize</Rights>
				</SecurityEntry>
				<SecurityEntry type="Group">
					<MemberID>CompanyUsers</MemberID>
					<Rights>ListDirectory</Rights>
				</SecurityEntry>
			</SecurityEntries>
			<SubDirectories>
				<Directory removeAllOtherSecurityEntries="true" removeSecurityEntriesInheritance="true" skipProcessingIfDirectoryExists="false">
					<Name>Project Management</Name>
					<SecurityEntries>
						<SecurityEntry type="Group">
							<MemberID>PrjOwners</MemberID>
							<Rights>Modify, Synchronize</Rights>
						</SecurityEntry>
						<SecurityEntry type="Group">
							<MemberID>PMO</MemberID>
							<Rights>Read, Synchronize</Rights>
						</SecurityEntry>
					</SecurityEntries>
				</Directory>
				<Directory removeAllOtherSecurityEntries="false" removeSecurityEntriesInheritance="false" skipProcessingIfDirectoryExists="false">
					<Name>Reports</Name>
					<SecurityEntries>
						<SecurityEntry type="Group">
							<MemberID>PMO</MemberID>
							<Rights>Modify, Synchronize</Rights>
						</SecurityEntry>
					</SecurityEntries>
				</Directory>
				<Directory removeAllOtherSecurityEntries="true" removeSecurityEntriesInheritance="true" skipProcessingIfDirectoryExists="false">
					<Name>Share</Name>
					<SecurityEntries>
						<SecurityEntry type="Group">
							<MemberID>CompanyUsers</MemberID>
							<Rights>Modify, Synchronize</Rights>
						</SecurityEntry>
					</SecurityEntries>
				</Directory>
			</SubDirectories>
		</Directory>
	</Directories>
	<Members>
		<Member type="Group" id="PMO">
			<!-- Program Management Office - group must already exist -->
			<Identifier>PMO</Identifier>
			<IdentificationType>cn</IdentificationType>
		</Member>
		<Member type="Group" id="CompanyUsers">
			<!-- group must already exist -->
			<Identifier>All Company Users</Identifier>
			<IdentificationType>cn</IdentificationType>
		</Member>

		<Member type="Group" id="PrjOwners">
			<!-- new Project Owners group -->
			<Identifier>P_${PrjID}.${Now.Year} Owners</Identifier>
			<IdentificationType>cn</IdentificationType>
			<CreationConfiguration>
				<GroupCreationConfiguration xmlns="http://www.utillity.com/schemas/rave/v1/ntfs" scope="Global" type="Security">
					<Description>PMO Project P_${PrjID}.${Now.Year} ${PrjName} Owners (\\domain\Projects\P_${PrjID}.${Now.Year} ${PrjName})</Description>
					<CreationOU>CN=Projects,${BaseDN}</CreationOU>
					<Members>
						<!--#set( $ownerCount = 0 )
						#foreach( $owner in $owners )
						#set( $ownerCount = $ownerCount + 1 )-->
						<ID>PrjOwner$ownerCount</ID>
						<!--#end-->
					</Members>
				</GroupCreationConfiguration>
			</CreationConfiguration>
		</Member>
		<!--#set( $ownerCount = 0 )
		#foreach( $owner in $owners )
		#set( $ownerCount = $ownerCount + 1 )-->
		<Member type="User" id="PrjOwner$ownerCount">
			<Identifier>$!{owner}</Identifier>
			<IdentificationType>sAMAccountName</IdentificationType>
		</Member>
		<!--#end-->

		<Member type="Group" id="PrjMembers">
			<!-- new Project Owners group -->
			<Identifier>P_${PrjID}.${Now.Year} Members</Identifier>
			<IdentificationType>cn</IdentificationType>
			<CreationConfiguration>
				<GroupCreationConfiguration xmlns="http://www.utillity.com/schemas/rave/v1/ntfs" scope="Global" type="Security">
					<Description>PMO Project P_${PrjID}.${Now.Year} ${PrjName} Members (\\domain\Projects\P_${PrjID}.${Now.Year} ${PrjName})</Description>
					<CreationOU>CN=Projects,${BaseDN}</CreationOU>
					<Members>
						<!--#set( $memberCount = 0 )
						#foreach( $member in $members )
						#set( $memberCount = $memberCount + 1 )-->
						<ID>PrjMember$memberCount</ID>
						<!--#end-->
					</Members>
				</GroupCreationConfiguration>
			</CreationConfiguration>
		</Member>
		<!--#set( $memberCount = 0 )
		#foreach( $member in $members )
		#set( $memberCount = $memberCount + 1 )-->
		<Member type="User" id="PrjMember$memberCount">
			<Identifier>$!{member}</Identifier>
			<IdentificationType>sAMAccountName</IdentificationType>
		</Member>
		<!--#end-->

		<!-- unused -->
		<Member type="User" id="Everyone">
			<Identifier>S-1-1-0</Identifier>
			<IdentificationType>objectsid</IdentificationType>
		</Member>
	</Members>
</Configuration>